package com.cd.sendRequest.jpa.domain;

import com.cd.common.domain.BaseDomain;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Index;
import javax.persistence.Table;
import java.util.Date;
/**
 * @Description:用于记录首页按钮映射
 * @Author: lqq
 * @Date: 2020/1/17 11:04
 */
@Data
@Entity
@Table(name = "db_extra_home_menu",
        indexes = {
                @Index(name = "idx_user_id", columnList = "user_id") // 添加索引优化查询性能
        })
@NoArgsConstructor
@AllArgsConstructor

public class HomeMenu extends BaseDomain {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "result_id")
    private Long resultId;

    //用户id
    @Column(name = "user_id")
    private Long userId;

    @Column(name = "menu_name",columnDefinition = "VARCHAR(255)")
    private String menuName;

    @Column(name = "url",columnDefinition = "VARCHAR(255)")
    private String url;

    //是否被删除
    @Column(name = "is_deleted", columnDefinition = "TINYINT(1) DEFAULT 0")
    private Boolean isDeleted;
}